﻿/*
function LoadImageUploadify() {
    $("#fileUpload").uploadify({
        'preventCaching': false,
        'uploader': '../scripts/uploadify/uploadify.swf',
        'script': '/Handlers/SubmissionHandler.ashx',
        'buttonImg': '/Imagenes/upload-icon.jpg',
        'cancelImg': '/scripts/uploadify/cancel.png',
        'folder': '/Media',
        'fileExt': '*.jpeg;*.jpg;*.gif;*.png',
        'fileDesc': 'Images',
        'queueID': 'divPhotoUpload',
        'wmode': 'transparent',
        'sizeLimit': '1048576',
        'width:': '40',
        'height': '40',
        'onError': UploadImageError,
        'onComplete': UploadComplete,
        'onAllComplete': UploadComplete(),
        'onSelect': function (event, ID, fileObj) {
            $('#hdnImageFileName').val(fileObj.name);
            $('#mensajeErrorImagen').text("");
        },
        'onQueueFull': function (event, queueSizeLimit) {
            displayalert('No more than 3 files are allowed', '#divSubmission', true);
            return false;
        },
        'onUploadSuccess' : function(file, data, response) {
            alert('The file ' + file.name + ' was successfully uploaded with a response of ' + response + ':' + data);
        },
        'queueSizeLimit': 3,
        'simUploadLimit': 3,
        'auto': false,
        'multi': false
    });
}

function UploadImageError(a, b, c, d) {
    //debugger;
    if (d.type == "File Size") {
        displayalert('La imagen parece no tener el formato adecuado o ser demasiado grande.', '#divSubmission', false);
    }
    else
        displayalert('Hubo un error al subir la imagen. Por favor, inténtelo de nuevo.', '#divSubmission', false);

}

function UploadComplete() {
    //debugger;
}
*/
function uploadSubmission(item) {
    //debugger;
    eval('submitir' + item + '();');
}

